DEMO 1: In this interactive activity, you'll choose the value of the variable by answering the sprite's question!

A variable is a name that stores a value. So far, you've used them to name sprites. In this lesson, you'll use a variable to store a string and a number. A variable creation statement uses an equal sign to connect the name to the value.

  • Hover over the parts of the variable creation statement on the stage to learn more about each part.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)